﻿<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
  <title>北京电子信息职业师范学院-信息管理系统</title>
 <link rel='stylesheet' type='text/css' href="login/custom/login.css" />
  <script type='text/javascript' src='login/custom/jquery1.7.2.js'></script>
  <script type="text/javascript" src="login/loginN4.js"></script>
  <script type="text/javascript" src="login/digestLoginN4.js"></script>
  <script type="text/javascript" src="login/core/auth.min.js"></script>
</head>
<body class="hold-transition login-page">
<div id="a-login-background">
  <img src="login/custom/login.jpg">
</div>
<div class="login-box">
  <div class="login-logo">
    <a class="white"><b class="red">北京电子信息职业师范学院</b>&nbsp;</a>
  </div>
  <div class="login-title white">信息管理系统</div>
  <div class="login-box-body">
    <div class="login-box-form">
      <div id="login-failed" style="display: none;">登录失败</div>
      <p class="login-box-msg">请输入登录信息：</p>
      <form id="login-form" method="post" action=j_security_check>
        <div class="form-group has-feedback">
          <input type="text" class="form-control" name="j_username" id="username" value="[nameTag]"
                 placeholder="请输入用户名">
        </div>
        <div class="form-group has-feedback">
          <input type="password" class="form-control" name="j_password" id='password' autocomplete="off" autofocus
                 placeholder="请输入密码">
        </div>
        <div class="row">
          <div class="col-xs-4 col-xs-offset-4">
            <button id="changeUser" class="btn btn-primary btn-block btn-flat">切换用户</button>
          </div>
          <div class="col-xs-4">
            <button id="loginBtn" type="submit" class="btn btn-success btn-block btn-flat" onclick="return doLogin();">
              登　录
            </button>
          </div>
        </div>
      </form>
    </div>
    <div class="toolbar clearfix" style="text-align: right;padding-right: 20px;">
      &copy;&nbsp;管理平台
    </div>
  </div>
  <!--
   <div id="lmessage" ltag="[ltag]"><p  style="color: red;" >Please check if the license file exists</p></div>
   -->
</div>
<script>
  function getQueryVariable(variable) {
    const query = window.location.search.substring(1);
    const vars = query.split("&");
    for (let i=0;i<vars.length;i++) {
      const pair = vars[i].split("=");
      if(pair[0] == variable){
        return pair[1];
      }
    }
    return(false);
  }
  $(function () {
    // if ($("#lmessage").attr("ltag") == 1){
    //   $("#lmessage").hide();
    //   $("#loginBtn").show();
    // }else {
    //   $("#lmessage").show();
    //   $("#loginBtn").hide();
    // }
 $("#changeUser").click(function (event) {
      event.preventDefault();
      location.href = "/prelogin?clear=true";
    });
    let focus = false;
    $(document).on("keydown", function (event) {
      const e = event || window.event || arguments.callee.caller.arguments[0];
      if (focus && e && e.keyCode == 13) {
        return doLogin();
      }
    });
    $('input').focus(function () {
      focus = true;
    });
    $('input').blur(function () {
      focus = false;
    });
    if (window != top) {
      top.location.href = location.href;
    }
  });
</script>
</body>
</html>
